package com.tizona.service;

import com.tizona.entity.Lc;
import com.tizona.entity.Invoice;

import java.util.Date;
import java.util.Calendar;
import java.sql.SQLException;

/**
 * Created by Vitaliy Kim.
 * Date: 23.08.2005
 * Time: 11:30:35
 */
public interface ContractManager {

    void handleActiveContracts(Calendar cur_time);

    public void handleAllContracts(Calendar modelTime);

    public void handleAllContracts(Calendar modelTime, long tp);

    public void handleCollocationContracts (Calendar modelTime);

    public void deleteOldChunks (Lc lc, Calendar abon_time) throws SQLException;

    public void makeTransactions(Lc lc) throws SQLException;

    public double getStartingSaldo(Lc lc, Calendar date) throws SQLException;

    public double getDebet(Lc lc, Calendar start, Calendar stop) throws SQLException;

    public double getCredit(Lc lc, Calendar start, Calendar stop) throws SQLException;

    public void setAmountOfContract(Invoice invoice, Calendar stopTime) throws SQLException;

    public void updateAccumulators(Lc lc, final Calendar modelTime) throws SQLException;

    public void loadAccumulators(Lc lc) throws SQLException;

    public void handleStaticContract(Calendar modelTime, long lc_num);
}
